from django.contrib.auth.models import User
from oAuth.models import NewUser,  Informations, Tasks, Shortages, Machines
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):

    class Meta:
        model = NewUser
        fields = [ 'username', 'id', 'name', 'roles', 'sex' ,'password']


class Informationerializer(serializers.ModelSerializer):

    class Meta:
        model = Informations
        fields = '__all__'

class Taskerializer(serializers.ModelSerializer):

    class Meta:
        model = Tasks
        fields = '__all__'

class ShortageSerializer(serializers.ModelSerializer):

    class Meta:
        model = Shortages
        fields = '__all__'

class MachineSerializer(serializers.ModelSerializer):

    class Meta:
        model = Machines
        fields = '__all__'